Skip to content

Conversation

@squirrelo
Copy link
Contributor

Does what it says on the tin. Also raises meaningful error with location of cells that have non-utf8 characters.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rise one of the QiitaDB errors?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And update the documentation of the method to reflect this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the QiitaDB errors make much sense here though. Which would you suggest?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just use QiitaDBError, at least we know that the errors is generated by us.

@josenavas
Copy link
Contributor

Just a small comment @squirrelo

@antgonza
Copy link
Member

Code looks good, could you add a test?

@squirrelo
Copy link
Contributor Author

Oh, yup, good call.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest using enumerate(holdfile, 1) given the use of the index below. Same on the nested forloop

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, didn't know about that. thanks.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 78.99% when pulling 4c91cae on squirrelo:utf8-issue into e492531 on biocore:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 78.99% when pulling 4c91cae on squirrelo:utf8-issue into e492531 on biocore:master.

@squirrelo
Copy link
Contributor Author

All comments taken care of. Ready for another round

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 79.13% when pulling c415e74 on squirrelo:utf8-issue into e492531 on biocore:master.

@antgonza
Copy link
Member

👍

@squirrelo
Copy link
Contributor Author

Hold on, checking something

@squirrelo
Copy link
Contributor Author

Had to revert to ValueError because raising the QiitaDBError caused a 500 error on the interface side.

@josenavas
Copy link
Contributor

Is the QiitaDBError not catched on the interface? If that's the case, I would suggest catching it rather than rely on ValueError (I know, more work, but core more robust...)

@squirrelo
Copy link
Contributor Author

Done

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 79.13% when pulling 2494f33 on squirrelo:utf8-issue into e492531 on biocore:master.

@josenavas
Copy link
Contributor

👍 @wasade can you review this again?

wasade added a commit that referenced this pull request May 20, 2015
Check for non-utf8 characters. Fix #1197
@wasade wasade merged commit 6819e8a into qiita-spots:master May 20, 2015
@ElDeveloper
Copy link
Contributor

Yargh, just noticed this PR is missing tests .... 😭

@squirrelo
Copy link
Contributor Author

It does: qiita_db/metadata_template/test/test_util.py

@ElDeveloper
Copy link
Contributor

I entirely missed that. 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants